SELECT p.iPostID, p.iPostType, p.iAdType, p.iUserType, p.strTitle, p.iSubType, p.iItemType, p.iPrice, p.iPriceUnit, json_unquote(p.jsonLocation->"$.city") AS city, p.jsonExtra, p.tmPosted, p.iShowImg, p.strImages, p.strVideos, p.strPostURL FROM posts p WHERE p.iActive=1 AND p.iPostType=1 AND iPostID IN (SELECT t.iPostID FROM posttext t WHERE t.iDomID=1 AND MATCH (t.strSearch) AGAINST ('+house +for +sale +realtor' IN BOOLEAN MODE)) AND iCityID IN (892,1005,1112,1042,940,1041,860,1257,1139,1040,1252,1080,808,880,1118,861,884,920,1046,1117,1202,16572,897,794,898,1247,581,1166,906,1146,928,836,564,823,1016,623,715,1230,873,1095,817,1043,1147,1179,844,617,1008,615,16306,616,858,714,822,1057,16298,1200,1085,919,1036,865,599,1094,679,685,1084,600,944,1110,1203,1156,1002,840,1038,909,1191,996,1270,1219,1013,1277,908,1113,16291,16132,1184,910,1240,760,1077,633,16130,765,955,629,16290) ORDER BY FIELD(iCityID, 892,1005,1112,1042,940,1041,860,1257,1139,1040,1252,1080,808,880,1118,861,884,920,1046,1117,1202,16572,897,794,898,1247,581,1166,906,1146,928,836,564,823,1016,623,715,1230,873,1095,817,1043,1147,1179,844,617,1008,615,16306,616,858,714,822,1057,16298,1200,1085,919,1036,865,599,1094,679,685,1084,600,944,1110,1203,1156,1002,840,1038,909,1191,996,1270,1219,1013,1277,908,1113,16291,16132,1184,910,1240,760,1077,633,16130,765,955,629,16290) ASC, p.tmPosted DESC LIMIT 24